import request from "../utils/request.ts";

//获取分页数据
export async function findPages(pageNum:number,pageSize:number) {
    return request({
        url: "/client/findPages",
        method: "get",
        params: {
            pageNum,
            pageSize
        }
    });
}
//获取列表数据
export function findList() {
    return request({
        url: "/client/findList",
        method: "get",
    });
}

//改变启用状态
export function change(clientid:string) {
    return request({
        url: "/client/change",
        method: "post",
        params: { clientid: clientid },
    });
}

//删除
export function deleteOne(clientid:string) {
    return request({
        url: "/client/delete",
        method: "post",
        params: { clientid: clientid },
    });
}

//模糊搜索
export function fuzzy(data:any) {
    return request({
        url: "/client/fuzzy",
        method: "post",
        data,
    });
}

//编辑
export function update(data:any) {
    return request({
        url: "/client/update",
        method: "post",
        data,
    });
}

//新增
export function insert(data:any) {
    return request({
        url: "/client/insert",
        method: "post",
        data,
    });
}

